There are a type of persistent storage devices known as solid-state drives (SSDs). SSDs typically use flash memory for storage, as opposed to the magnetic-based storage means found in many mechanical hard drives. A problem exists with SSDs because they require relatively significant time to write to the drive's blocks when those blocks have not been erased since they were previously written to. Additionally, many computer systems are configured so that when data is erased, that data is merely noted as being erased in the file system, and that data is not actually erased on the drive. That data may then stay on the drive until new data is written to its blocks. A solution to this problem is TRIMming (sometimes referred to without capital letters, as trimming), where the operating system indicates to a SSD which data blocks are no longer used and may be erased. The SSD may receive this TRIM command and mark the associated logical block addresses (LBAs) as trimmed. At this point, the SSD may determine not to copy the data from those LBAs during garbage collection (a SSD frequently can erase only a relatively large chunk of data at once, so then copies out the valid data from that portion so that it may erase the unused portion). In this manner, a block may be erased long before a new write is made to it, significantly speeding up the completion of that write operation. The total number of internal IO operations necessary to complete the write is also reduced, which can increase the life expectancy of the SSD. A similar command called UNMAP is typically used for similar purposes, and also to reclaim physical storage space in thin-provisioned storage environments.
Despite these advantages of TRIM and UNMAP, they also have several problems, some of which are well known.